31006: Function test for xfm:pow

Documentation

Tests of function xfm:pow The test cases below are taken from the w3c XPath 3.1 test suite at https://dev.w3.org/cvsweb/2011/QT3-test-suite/math/.

Owners

Name Affiliation Email Start End
Harald Schmitt ABZ Reporting GmbH harald.schmitt@abz-reporting.com 29-10-2018 at 00:00:00

References

https://www.w3.org/TR/xpath-functions-31/#func-math-pow

https://dev.w3.org/cvsweb/2011/QT3-test-suite/math/

Test Case Variations


V-01 Evaluate the function xfm:pow() with the arguments () and 93.7

Documentation

Inputs

Outputs

  • Result test: empty($result)

V-02 Evaluate the function xfm:pow() with the arguments 2 and 3

Documentation

Inputs

Outputs

  • Result test: $result eq 8.0e0

V-03 Evaluate the function xfm:pow() with the arguments -2 and 3

Documentation

Inputs

Outputs

  • Result test: $result eq -8.0e0

V-04 Evaluate the function xfm:pow() with the arguments -2 and -3

Documentation

Inputs

Outputs

  • Result test: $result eq -0.125e0

V-05 Evaluate the function xfm:pow() with the arguments 2 and 0

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-06 Evaluate the function xfm:pow() with the arguments 0 and 0

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-07 Evaluate the function xfm:pow() with the arguments xs:double('INF') and 0

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-08 Evaluate the function xfm:pow() with the arguments xs:double('NaN') and 0

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-09 Evaluate the function xfm:pow() with the arguments -xfm:pi() and 0

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-10 Evaluate the function xfm:pow() with the arguments 0e0 and 3

Documentation

Inputs

Outputs

  • Result test: $result eq 0.0e0

V-11 Evaluate the function xfm:pow() with the arguments 0e0 and 4

Documentation

Inputs

Outputs

  • Result test: $result eq 0.0e0

V-12 Evaluate the function xfm:pow() with the arguments -0e0 and 3

Documentation

Inputs

Outputs

  • Result test: $result eq -0.0e0

V-13 Evaluate the function xfm:pow() with the arguments 0 and 4

Documentation

Inputs

Outputs

  • Result test: $result eq 0.0e0

V-14 Evaluate the function xfm:pow() with the arguments 0e0 and -3

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('INF')

V-15 Evaluate the function xfm:pow() with the arguments 0e0 and -4

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('INF')

V-16 Evaluate the function xfm:pow() with the arguments -0e0 and -3

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('-INF')

V-17 Evaluate the function xfm:pow() with the arguments 0 and -4

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('INF')

V-18 Evaluate the function xfm:pow() with the arguments 16 and 0.5e0

Documentation

Inputs

Outputs

  • Result test: $result eq 4.0e0

V-19 Evaluate the function xfm:pow() with the arguments 16 and 0.25e0

Documentation

Inputs

Outputs

  • Result test: $result eq 2.0e0

V-20 Evaluate the function xfm:pow() with the arguments 0e0 and -3.0e0

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('INF')

V-21 Evaluate the function xfm:pow() with the arguments -0e0 and -3.0e0

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('-INF')

V-22 Evaluate the function xfm:pow() with the arguments 0e0 and -3.1e0

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('INF')

V-23 Evaluate the function xfm:pow() with the arguments -0e0 and -3.1e0

Documentation

Inputs

Outputs

  • Result test: $result eq xs:double('INF')

V-24 Evaluate the function xfm:pow() with the arguments 0e0 3.0e0

Documentation

Inputs

Outputs

  • Result test: $result eq 0.0e0

V-25 Evaluate the function xfm:pow() with the arguments -0e0 and 3.0e0

Documentation

Inputs

Outputs

  • Result test: $result eq 0.0e0

V-26 Evaluate the function xfm:pow() with the arguments 0e0 3.1e0

Documentation

Inputs

Outputs

  • Result test: $result eq 0.0e0

V-27 Evaluate the function xfm:pow() with the arguments -0e0 and 3.1e0

Documentation

Inputs

Outputs

  • Result test: $result eq 0.0e0

V-28 Evaluate the function xfm:pow() with the arguments -1 and xs:double('INF')

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-29 Evaluate the function xfm:pow() with the arguments -1 and xs:double('-INF')

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-30 Evaluate the function xfm:pow() with the arguments 1 and xs:double('INF')

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-31 Evaluate the function xfm:pow() with the arguments 1 and xs:double('-INF')

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-32 Evaluate the function xfm:pow() with the arguments 1 and xs:double('NaN')

Documentation

Inputs

Outputs

  • Result test: $result eq 1.0e0

V-33 Evaluate the function xfm:pow() with the arguments -2.5 and 2.0e0

Documentation

Inputs

Outputs

  • Result test: $result eq 6.25e0

V-34 Evaluate the function xfm:pow() with the arguments -2.5 and 2.0000001

Documentation

Inputs

Outputs

  • Result test: string($result) eq 'NaN'

Revisions

Name On Details
Harald Schmitt 29-10-2018 at 00:00:00 Created the test case.